package com.tz.entity;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by Administrator on 16-8-5.
 */
@Entity
@Table(name = "TBL_FAQ")
public class Faq implements Serializable{

    private static final long serialVersionUID = 1L;

    private long id;

    private String name;

    private String description;

    public Faq() {
    }

    public Faq(String name, String description) {
        this.name = name;
        this.description = description;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO,generator = "faq_id")
    @SequenceGenerator(name = "faq_id",sequenceName = "seq_faq_id")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Column
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(length = 5000)
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Faq{");
        sb.append("id=").append(id);
        sb.append(", name='").append(name).append('\'');
        sb.append(", description='").append(description).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
